<template>
  <div>
    <div class="store">
      <div class="store-hd w" @click="gundong">
        <div class="hd-l">
          <a href="#">Du码通道</a>
          <a href="#">售后政策</a>
          <a href="#">隐私政策</a>
          <a href="#">隐私问题</a>
          <a href="#">用户协议</a>
          <a href="#">DuerOS开放平台</a>
          <a href="#">线下门店</a>
        </div>
        <div class="hd-r">
          <div class="email">
            <div class="zixun">
              <a href="#">立刻咨询</a>
            </div>
            <p>周一至周日 09:00-22:00</p>
            <p>qiyehezuo@baidu.com</p>
            <p>企业大宗采购邮箱</p>
          </div>
          <div class="ewm">
            <div class="img">
              <img src="../assets/img/ewm.png" width="94px" alt="" />
            </div>
            <p>扫码添加微信<br />享1对1专属服务</p>
          </div>
        </div>
      </div>
    </div>

    <div class="side">
      <ul>
        <li>
          <span class="iconfont icon-shouji"></span>
        </li>
        <li>
          <span class="iconfont icon-weixin1"></span>
        </li>
        <router-link to="/shopCarView" tag="li">
          <span class="iconfont icon-icon01"></span>
        </router-link>
        <li>
          <span class="iconfont icon-kefu1"></span>
        </li>
        <li v-show="intFlag" @click="toTop">
          <span class="iconfont icon-zhiding"></span>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      intFlag:false
    }
  },
  methods:{
    gundong(event) {
      this.scrollTop =
        event.target.documentElement.scrollTop || event.target.body.scrollTop;
      if (this.scrollTop >= 900) {
        this.intFlag = true;
      } else {
        this.intFlag = false;
      }
    },
    toTop(){
      document.documentElement.scrollTop=0
    }
  },
  mounted() {
    window.addEventListener("scroll", this.gundong);
  },
};
</script>

<style lang="scss" scoped>
@import "../assets/css/public.scss";
@import "../assets/css/foot.scss";
</style>